cssnode: GtkCssAnimatedStyle->style is always a static style
authorTimm Bäder <mail@baedert.org>
Sat, 24 Aug 2019 08:09:41 +0000 (10:09 +0200)
committerTimm Bäder <mail@baedert.org>
Mon, 9 Sep 2019 15:36:24 +0000 (17:36 +0200)
gtk/gtkcssnode.c

index 039791e8739c14581ec86a07562d08479d864a1b..0cce324e055f06b3a6a2ec07476533c5ae738330 100644 (file)
@@ -25,6 +25,7 @@
 #include "gtkmarshalers.h"
 #include "gtksettingsprivate.h"
 #include "gtktypebuiltins.h"
+#include "gtkprivate.h"
 
 /*
  * CSS nodes are the backbone of the GtkStyleContext implementation and
@@ -386,13 +387,12 @@ static gboolean
 gtk_css_style_needs_recreation (GtkCssStyle  *style,
                                 GtkCssChange  change)
 {
+  gtk_internal_return_val_if_fail (GTK_IS_CSS_STATIC_STYLE (style), TRUE);
+
   /* Try to avoid invalidating if we can */
   if (change & GTK_CSS_RADICAL_CHANGE)
     return TRUE;
 
-  if (GTK_IS_CSS_ANIMATED_STYLE (style))
-    style = GTK_CSS_ANIMATED_STYLE (style)->style;
-
   if (gtk_css_static_style_get_change (GTK_CSS_STATIC_STYLE (style)) & change)
     return TRUE;
   else